0 - quickStart Example¶


This notebook will guide you through the basic functionality of PV_ICE. Once you are done with this tutorial, you will be able to:

  • Set up a PV_ICE simulation and create scenarios.
  • Compute Mass and Energy flows calculations.
  • Plot results.

Please refer to the PV_ICE documentation page to get a complete insight of the package.

0.1   Simulation Setup

To setup a PV_ICE simulation we need (1) import necessary packages, (2) create simulation folder path, (3) create a baseline path.

First let's import the necessary libraries for this notebook:

In [1]:
import os # Creates and removes a directory (folder), fetch its contents, change and identify the current directory
from pathlib import Path
import PV_ICE # Load PV_ICE package

print("Successfully imported PV_ICE, version ", PV_ICE.__version__)
Successfully imported PV_ICE, version  v0.2.0+459.g7b52e10.dirty

1. Create a folder for your simulation, and load PV ICE¶

Let's set the folder where the simulation will be saved. By default, this is the TEMP folder in the PV_ICE distribution, however, we have created a TEMP folder in the present folder for simplicity.

Tip: The lines below find the location of the folder relative to this Jupyter Journal, where `Path().resolve()` points at the current notebook absolute location, add `.parent` to navigate to previous folders and `/ 'folder' / ...` to navigate within a specific folder.. You can alternatively point to an empty directory (it will open a load GUI Visual Interface) or specify any other directory in your computer.

Using the same logic, setup the baselines folder. This is where all the baselines are stored in .csv format. A folder with multiple baselines can be found in the PV_ICE repository (PV_ICE/PV_ICE/baselines), you can always copy this folder and put it in a path of your choice. You may also create your own baselines (following the key structure used in PV_ICE for scenarios and materials).

In [2]:
testfolder = str(Path().resolve().parent.parent / 'PV_ICE' / 'TEMP' / 'Tutorial0') # Path to the simulation folder.

baselinesfolder = str(Path().resolve().parent.parent / 'PV_ICE' / 'baselines')  # Path to baselines and data.

# Another option using relative address; for some operative systems you might need '/' instead of '\'
# testfolder = os.path.abspath(r'..\..\PV_DEMICE\TEMP')  

print ("Your simulation will be stored in %s" % testfolder)
print ("Your baselines are stored in %s" % baselinesfolder)

if not os.path.exists(testfolder):
    os.makedirs(testfolder)
Your simulation will be stored in C:\Users\sayala\Documents\GitHub\PV_ICE\PV_ICE\TEMP\Tutorial0
Your baselines are stored in C:\Users\sayala\Documents\GitHub\PV_ICE\PV_ICE\baselines

0.2. Create Simulation Object ¶

The simulation object will create a container for all the different scenario(s) you might want to test. The method Simulation requires two inputs:

  • name for the simulation (in this example 'Simulation_1'), if no name is given the program will autogenerate a default name with the current date
  • path, this is where we insert testfolder defined above, we named this simulation object r1
In [3]:
r1 = PV_ICE.Simulation(name='Simulation_1', path=testfolder); # Is it possible to define more than one simulation here?
print(r1.name) # Shows the name of the simulation object
print(r1.path) # Shows the path of the simulation object
path = C:\Users\sayala\Documents\GitHub\PV_ICE\PV_ICE\TEMP\Tutorial0
Baseline folder directed to default:  C:\Users\sayala\Documents\GitHub\PV_ICE\PV_ICE\baselines
<class 'str'>
Simulation_1
C:\Users\sayala\Documents\GitHub\PV_ICE\PV_ICE\TEMP\Tutorial0

3. Specify your baseline Scenario¶

We have put together scenarios representing the average module for various situations, for example throughout the US history. We will load this baseline scenario now, and it will be named standard:

In [4]:
r1.createScenario(name='standard')
Please pass one of the following options:  ['baseline_modules_mass_US.csv', 'baseline_modules_mass_US_CdTe.csv', 'baseline_modules_mass_US_HistoryUtilCommOnly.csv', 'baseline_modules_mass_US_updatedT50T90.csv', 'baseline_modules_mass_World.csv']

If no massmodulefile baseline is passed, it will print out all of the options as above.

In [5]:
r1.createScenario(name='standard', massmodulefile='baseline_modules_mass_US.csv')
No energy module file passed. If desired, pass one of the following options:  ['baseline_modules_energy.csv']

Other ways of passing the file include passing the whole path as below:

In [6]:
r1.createScenario(name='standard', massmodulefile=os.path.join(baselinesfolder,'baseline_modules_mass_US.csv'))
No energy module file passed. If desired, pass one of the following options:  ['baseline_modules_energy.csv']
In [7]:
##  Alternative method
# modulefile = r'C:\Users\sayala\Documents\GitHub\PV_ICE\PV_ICE\baselines\baseline_modules_mass_US.csv'
# r1.createScenario(name='standard', massmodulefile=modulefile)

4. Specify material(s)¶

We will add the material 'glass' to our simulation. Years of data must match, and they do if using the provided baselines.

In [8]:
r1.scenario['standard'].addMaterials(['glass'])
Adding Mass AND Energy files for:  glass
In [9]:
r1.scenario['standard'].material['glass'].__dict__
Out[9]:
{'materialname': 'glass',
 'massmatfile': 'C:\\Users\\sayala\\Documents\\GitHub\\PV_ICE\\PV_ICE\\baselines\\baseline_material_mass_glass.csv',
 'matmetdataIn_m': {'year': 'year',
  'mat_virgin_eff': '%',
  'mat_massperm2': 'g',
  'mat_MFG_eff': '%',
  'mat_MFG_scrap_Recycled': '%',
  'mat_MFG_scrap_Recycling_eff': '%',
  'mat_MFG_scrap_Recycled_into_HQ': '%',
  'mat_MFG_scrap_Recycled_into_HQ_Reused4MFG': '%',
  'mat_PG3_ReMFG_target': '%',
  'mat_ReMFG_yield': '%',
  'mat_PG4_Recycling_target': '%',
  'mat_Recycling_yield': '%',
  'mat_EOL_Recycled_into_HQ': '%',
  'mat_EOL_RecycledHQ_Reused4MFG': '%'},
 'matdataIn_m':     year  mat_virgin_eff  mat_massperm2  mat_MFG_eff  mat_MFG_scrap_Recycled  \
 0   1995            60.0     8000.00000         95.0                    80.0   
 1   1996            60.0     8000.00000         95.0                    80.0   
 2   1997            60.0     8000.00000         95.0                    80.0   
 3   1998            60.0     8000.00000         95.0                    80.0   
 4   1999            60.0     8000.00000         95.0                    80.0   
 5   2000            60.0     8000.00000         95.0                    80.0   
 6   2001            60.0     8000.00000         95.0                    80.0   
 7   2002            60.0     8000.00000         95.0                    80.0   
 8   2003            60.0     8000.00000         95.0                    80.0   
 9   2004            60.0     8000.00000         95.0                    80.0   
 10  2005            60.0     8000.00000         95.0                    80.0   
 11  2006            60.0     8000.00000         95.0                    80.0   
 12  2007            60.0     8000.00000         95.0                    80.0   
 13  2008            60.0     8000.00000         95.0                    80.0   
 14  2009            60.0     8000.00000         95.0                    80.0   
 15  2010            60.0     8000.00000         95.0                    80.0   
 16  2011            60.0     8000.00000         95.0                    80.0   
 17  2012            60.0     8080.00000         95.0                    80.0   
 18  2013            60.0     8160.00000         95.0                    80.0   
 19  2014            60.0     8292.70000         95.2                    80.0   
 20  2015            60.0     8225.66250         95.5                    80.0   
 21  2016            60.0     8158.88750         95.7                    80.0   
 22  2017            60.0     8289.75000         95.9                    80.0   
 23  2018            60.0     8350.15000         96.2                    80.0   
 24  2019            60.0     8607.50000         96.4                    80.0   
 25  2020            60.0     8975.50000         96.6                    80.0   
 26  2021            60.0     9284.58750         96.9                    80.0   
 27  2022            60.0     9626.50000         97.1                    80.0   
 28  2023            60.0     9805.45000         97.4                    80.0   
 29  2024            60.0     9977.40000         97.6                    80.0   
 30  2025            60.0     9940.23750         97.8                    80.0   
 31  2026            60.0     9901.50000         98.1                    80.0   
 32  2027            60.0    10008.40556         98.3                    80.0   
 33  2028            60.0    10113.40556         98.5                    80.0   
 34  2029            60.0    10216.50000         98.8                    80.0   
 35  2030            60.0    10170.91111         99.0                    80.0   
 36  2031            60.0    10125.01111         99.0                    80.0   
 37  2032            60.0    10125.01111         99.0                    80.0   
 38  2033            60.0    10125.01111         99.0                    80.0   
 39  2034            60.0    10125.01111         99.0                    80.0   
 40  2035            60.0    10125.01111         99.0                    80.0   
 41  2036            60.0    10125.01111         99.0                    80.0   
 42  2037            60.0    10125.01111         99.0                    80.0   
 43  2038            60.0    10125.01111         99.0                    80.0   
 44  2039            60.0    10125.01111         99.0                    80.0   
 45  2040            60.0    10125.01111         99.0                    80.0   
 46  2041            60.0    10125.01111         99.0                    80.0   
 47  2042            60.0    10125.01111         99.0                    80.0   
 48  2043            60.0    10125.01111         99.0                    80.0   
 49  2044            60.0    10125.01111         99.0                    80.0   
 50  2045            60.0    10125.01111         99.0                    80.0   
 51  2046            60.0    10125.01111         99.0                    80.0   
 52  2047            60.0    10125.01111         99.0                    80.0   
 53  2048            60.0    10125.01111         99.0                    80.0   
 54  2049            60.0    10125.01111         99.0                    80.0   
 55  2050            60.0    10125.01111         99.0                    80.0   
 
     mat_MFG_scrap_Recycling_eff  mat_MFG_scrap_Recycled_into_HQ  \
 0                          50.0                            20.0   
 1                          50.0                            20.0   
 2                          50.0                            20.0   
 3                          50.0                            20.0   
 4                          50.0                            20.0   
 5                          50.0                            20.0   
 6                          50.0                            20.0   
 7                          50.0                            20.0   
 8                          50.0                            20.0   
 9                          50.0                            20.0   
 10                         50.0                            20.0   
 11                         50.0                            20.0   
 12                         50.0                            20.0   
 13                         50.0                            20.0   
 14                         50.0                            20.0   
 15                         50.0                            20.0   
 16                         50.0                            20.0   
 17                         50.0                            20.0   
 18                         50.0                            20.0   
 19                         50.0                            20.0   
 20                         50.0                            20.0   
 21                         50.0                            20.0   
 22                         50.0                            20.0   
 23                         50.0                            20.0   
 24                         50.0                            20.0   
 25                         50.0                            20.0   
 26                         50.0                            20.0   
 27                         50.0                            20.0   
 28                         50.0                            20.0   
 29                         50.0                            20.0   
 30                         50.0                            20.0   
 31                         50.0                            20.0   
 32                         50.0                            20.0   
 33                         50.0                            20.0   
 34                         50.0                            20.0   
 35                         50.0                            20.0   
 36                         50.0                            20.0   
 37                         50.0                            20.0   
 38                         50.0                            20.0   
 39                         50.0                            20.0   
 40                         50.0                            20.0   
 41                         50.0                            20.0   
 42                         50.0                            20.0   
 43                         50.0                            20.0   
 44                         50.0                            20.0   
 45                         50.0                            20.0   
 46                         50.0                            20.0   
 47                         50.0                            20.0   
 48                         50.0                            20.0   
 49                         50.0                            20.0   
 50                         50.0                            20.0   
 51                         50.0                            20.0   
 52                         50.0                            20.0   
 53                         50.0                            20.0   
 54                         50.0                            20.0   
 55                         50.0                            20.0   
 
     mat_MFG_scrap_Recycled_into_HQ_Reused4MFG  mat_PG3_ReMFG_target  \
 0                                        10.0                   0.0   
 1                                        10.0                   0.0   
 2                                        10.0                   0.0   
 3                                        10.0                   0.0   
 4                                        10.0                   0.0   
 5                                        10.0                   0.0   
 6                                        10.0                   0.0   
 7                                        10.0                   0.0   
 8                                        10.0                   0.0   
 9                                        10.0                   0.0   
 10                                       10.0                   0.0   
 11                                       10.0                   0.0   
 12                                       10.0                   0.0   
 13                                       10.0                   0.0   
 14                                       10.0                   0.0   
 15                                       10.0                   0.0   
 16                                       10.0                   0.0   
 17                                       10.0                   0.0   
 18                                       10.0                   0.0   
 19                                       10.0                   0.0   
 20                                       10.0                   0.0   
 21                                       10.0                   0.0   
 22                                       10.0                   0.0   
 23                                       10.0                   0.0   
 24                                       10.0                   0.0   
 25                                       10.0                   0.0   
 26                                       10.0                   0.0   
 27                                       10.0                   0.0   
 28                                       10.0                   0.0   
 29                                       10.0                   0.0   
 30                                       10.0                   0.0   
 31                                       10.0                   0.0   
 32                                       10.0                   0.0   
 33                                       10.0                   0.0   
 34                                       10.0                   0.0   
 35                                       10.0                   0.0   
 36                                       10.0                   0.0   
 37                                       10.0                   0.0   
 38                                       10.0                   0.0   
 39                                       10.0                   0.0   
 40                                       10.0                   0.0   
 41                                       10.0                   0.0   
 42                                       10.0                   0.0   
 43                                       10.0                   0.0   
 44                                       10.0                   0.0   
 45                                       10.0                   0.0   
 46                                       10.0                   0.0   
 47                                       10.0                   0.0   
 48                                       10.0                   0.0   
 49                                       10.0                   0.0   
 50                                       10.0                   0.0   
 51                                       10.0                   0.0   
 52                                       10.0                   0.0   
 53                                       10.0                   0.0   
 54                                       10.0                   0.0   
 55                                       10.0                   0.0   
 
     mat_ReMFG_yield  mat_PG4_Recycling_target  mat_Recycling_yield  \
 0              50.0                      90.0                 40.0   
 1              50.0                      90.0                 40.0   
 2              50.0                      90.0                 40.0   
 3              50.0                      90.0                 40.0   
 4              50.0                      90.0                 40.0   
 5              50.0                      90.0                 40.0   
 6              50.0                      90.0                 40.0   
 7              50.0                      90.0                 40.0   
 8              50.0                      90.0                 40.0   
 9              50.0                      90.0                 40.0   
 10             50.0                      90.0                 40.0   
 11             50.0                      90.0                 40.0   
 12             50.0                      90.0                 40.0   
 13             50.0                      90.0                 40.0   
 14             50.0                      90.0                 40.0   
 15             50.0                      90.0                 40.0   
 16             50.0                      90.0                 40.0   
 17             50.0                      90.0                 40.0   
 18             50.0                      90.0                 40.0   
 19             50.0                      90.0                 40.0   
 20             50.0                      90.0                 40.0   
 21             50.0                      90.0                 40.0   
 22             50.0                      90.0                 40.0   
 23             50.0                      90.0                 40.0   
 24             50.0                      90.0                 40.0   
 25             50.0                      90.0                 40.0   
 26             50.0                      90.0                 40.0   
 27             50.0                      90.0                 40.0   
 28             50.0                      90.0                 40.0   
 29             50.0                      90.0                 40.0   
 30             50.0                      90.0                 40.0   
 31             50.0                      90.0                 40.0   
 32             50.0                      90.0                 40.0   
 33             50.0                      90.0                 40.0   
 34             50.0                      90.0                 40.0   
 35             50.0                      90.0                 40.0   
 36             50.0                      90.0                 40.0   
 37             50.0                      90.0                 40.0   
 38             50.0                      90.0                 40.0   
 39             50.0                      90.0                 40.0   
 40             50.0                      90.0                 40.0   
 41             50.0                      90.0                 40.0   
 42             50.0                      90.0                 40.0   
 43             50.0                      90.0                 40.0   
 44             50.0                      90.0                 40.0   
 45             50.0                      90.0                 40.0   
 46             50.0                      90.0                 40.0   
 47             50.0                      90.0                 40.0   
 48             50.0                      90.0                 40.0   
 49             50.0                      90.0                 40.0   
 50             50.0                      90.0                 40.0   
 51             50.0                      90.0                 40.0   
 52             50.0                      90.0                 40.0   
 53             50.0                      90.0                 40.0   
 54             50.0                      90.0                 40.0   
 55             50.0                      90.0                 40.0   
 
     mat_EOL_Recycled_into_HQ  mat_EOL_RecycledHQ_Reused4MFG  
 0                       15.0                            8.0  
 1                       15.0                            8.0  
 2                       15.0                            8.0  
 3                       15.0                            8.0  
 4                       15.0                            8.0  
 5                       15.0                            8.0  
 6                       15.0                            8.0  
 7                       15.0                            8.0  
 8                       15.0                            8.0  
 9                       15.0                            8.0  
 10                      15.0                            8.0  
 11                      15.0                            8.0  
 12                      15.0                            8.0  
 13                      15.0                            8.0  
 14                      15.0                            8.0  
 15                      15.0                            8.0  
 16                      15.0                            8.0  
 17                      15.0                            8.0  
 18                      15.0                            8.0  
 19                      15.0                            8.0  
 20                      15.0                            8.0  
 21                      15.0                            8.0  
 22                      15.0                            8.0  
 23                      15.0                            8.0  
 24                      15.0                            8.0  
 25                      15.0                            8.0  
 26                      15.0                            8.0  
 27                      15.0                            8.0  
 28                      15.0                            8.0  
 29                      15.0                            8.0  
 30                      15.0                            8.0  
 31                      15.0                            8.0  
 32                      15.0                            8.0  
 33                      15.0                            8.0  
 34                      15.0                            8.0  
 35                      15.0                            8.0  
 36                      15.0                            8.0  
 37                      15.0                            8.0  
 38                      15.0                            8.0  
 39                      15.0                            8.0  
 40                      15.0                            8.0  
 41                      15.0                            8.0  
 42                      15.0                            8.0  
 43                      15.0                            8.0  
 44                      15.0                            8.0  
 45                      15.0                            8.0  
 46                      15.0                            8.0  
 47                      15.0                            8.0  
 48                      15.0                            8.0  
 49                      15.0                            8.0  
 50                      15.0                            8.0  
 51                      15.0                            8.0  
 52                      15.0                            8.0  
 53                      15.0                            8.0  
 54                      15.0                            8.0  
 55                      15.0                            8.0  ,
 'energymatfile': 'C:\\Users\\sayala\\Documents\\GitHub\\PV_ICE\\PV_ICE\\baselines\\baseline_material_energy_glass.csv',
 'matmetdataIn_e': {'year': 'year',
  'e_mat_extraction': 'kWh/kg',
  'e_mat_MFG': 'kWh/kg',
  'e_mat_MFG_fuelfraction': '%',
  'e_mat_MFGScrap_LQ': 'kWh/kg',
  'e_mat_MFGScrap_HQ': 'kWh/kg',
  'e_mat_Landfill': 'kWh/kg',
  'e_mat_Landfill_fuelfraction': '%',
  'e_mat_EoL_ReMFG_clean': 'kWh/kg',
  'e_mat_Recycled_LQ': 'kWh/kg',
  'e_mat_Recycled_HQ': 'kWh/kg',
  'e_mat_Recycled_HQ_fuelfraction': '%'},
 'matdataIn_e':     year  e_mat_extraction  e_mat_MFG  e_mat_MFG_fuelfraction  \
 0   1995            0.0062   4.591724               80.039660   
 1   1996            0.0062   4.591724               80.039660   
 2   1997            0.0062   4.591724               80.039660   
 3   1998            0.0062   4.539363               80.026683   
 4   1999            0.0062   4.487001               80.015438   
 5   2000            0.0062   4.434640               80.005988   
 6   2001            0.0062   4.382279               79.998397   
 7   2002            0.0062   4.318724               80.200079   
 8   2003            0.0062   4.255168               80.409933   
 9   2004            0.0062   4.191613               80.628330   
 10  2005            0.0062   4.128057               80.855665   
 11  2006            0.0062   4.064501               81.092357   
 12  2007            0.0062   4.022057               81.475723   
 13  2008            0.0062   3.979613               81.867267   
 14  2009            0.0062   3.937168               82.267252   
 15  2010            0.0062   3.894724               82.675956   
 16  2011            0.0062   3.852279               83.093666   
 17  2012            0.0062   3.809835               83.520683   
 18  2013            0.0062   3.767390               83.957322   
 19  2014            0.0062   3.724946               84.403912   
 20  2015            0.0062   3.682501               84.860796   
 21  2016            0.0062   3.640057               85.328335   
 22  2017            0.0062   3.597613               85.806906   
 23  2018            0.0062   3.555168               86.296905   
 24  2019            0.0062   3.512724               86.798744   
 25  2020            0.0062   3.512724               86.798744   
 26  2021            0.0062   3.512724               86.798744   
 27  2022            0.0062   3.512724               86.798744   
 28  2023            0.0062   3.512724               86.798744   
 29  2024            0.0062   3.512724               86.798744   
 30  2025            0.0062   3.512724               86.798744   
 31  2026            0.0062   3.512724               86.798744   
 32  2027            0.0062   3.512724               86.798744   
 33  2028            0.0062   3.512724               86.798744   
 34  2029            0.0062   3.512724               86.798744   
 35  2030            0.0062   3.512724               86.798744   
 36  2031            0.0062   3.512724               86.798744   
 37  2032            0.0062   3.512724               86.798744   
 38  2033            0.0062   3.512724               86.798744   
 39  2034            0.0062   3.512724               86.798744   
 40  2035            0.0062   3.512724               86.798744   
 41  2036            0.0062   3.512724               86.798744   
 42  2037            0.0062   3.512724               86.798744   
 43  2038            0.0062   3.512724               86.798744   
 44  2039            0.0062   3.512724               86.798744   
 45  2040            0.0062   3.512724               86.798744   
 46  2041            0.0062   3.512724               86.798744   
 47  2042            0.0062   3.512724               86.798744   
 48  2043            0.0062   3.512724               86.798744   
 49  2044            0.0062   3.512724               86.798744   
 50  2045            0.0062   3.512724               86.798744   
 51  2046            0.0062   3.512724               86.798744   
 52  2047            0.0062   3.512724               86.798744   
 53  2048            0.0062   3.512724               86.798744   
 54  2049            0.0062   3.512724               86.798744   
 55  2050            0.0062   3.512724               86.798744   
 
     e_mat_MFGScrap_LQ  e_mat_MFGScrap_HQ  e_mat_Landfill  \
 0                 1.4                1.4            0.09   
 1                 1.4                1.4            0.09   
 2                 1.4                1.4            0.09   
 3                 1.4                1.4            0.09   
 4                 1.4                1.4            0.09   
 5                 1.4                1.4            0.09   
 6                 1.4                1.4            0.09   
 7                 1.4                1.4            0.09   
 8                 1.4                1.4            0.09   
 9                 1.4                1.4            0.09   
 10                1.4                1.4            0.09   
 11                1.4                1.4            0.09   
 12                1.4                1.4            0.09   
 13                1.4                1.4            0.09   
 14                1.4                1.4            0.09   
 15                1.4                1.4            0.09   
 16                1.4                1.4            0.09   
 17                1.4                1.4            0.09   
 18                1.4                1.4            0.09   
 19                1.4                1.4            0.09   
 20                1.4                1.4            0.09   
 21                1.4                1.4            0.09   
 22                1.4                1.4            0.09   
 23                1.4                1.4            0.09   
 24                1.4                1.4            0.09   
 25                1.4                1.4            0.09   
 26                1.4                1.4            0.09   
 27                1.4                1.4            0.09   
 28                1.4                1.4            0.09   
 29                1.4                1.4            0.09   
 30                1.4                1.4            0.09   
 31                1.4                1.4            0.09   
 32                1.4                1.4            0.09   
 33                1.4                1.4            0.09   
 34                1.4                1.4            0.09   
 35                1.4                1.4            0.09   
 36                1.4                1.4            0.09   
 37                1.4                1.4            0.09   
 38                1.4                1.4            0.09   
 39                1.4                1.4            0.09   
 40                1.4                1.4            0.09   
 41                1.4                1.4            0.09   
 42                1.4                1.4            0.09   
 43                1.4                1.4            0.09   
 44                1.4                1.4            0.09   
 45                1.4                1.4            0.09   
 46                1.4                1.4            0.09   
 47                1.4                1.4            0.09   
 48                1.4                1.4            0.09   
 49                1.4                1.4            0.09   
 50                1.4                1.4            0.09   
 51                1.4                1.4            0.09   
 52                1.4                1.4            0.09   
 53                1.4                1.4            0.09   
 54                1.4                1.4            0.09   
 55                1.4                1.4            0.09   
 
     e_mat_Landfill_fuelfraction  e_mat_EoL_ReMFG_clean  e_mat_Recycled_LQ  \
 0                          78.0                   0.61                1.4   
 1                          78.0                   0.61                1.4   
 2                          78.0                   0.61                1.4   
 3                          78.0                   0.61                1.4   
 4                          78.0                   0.61                1.4   
 5                          78.0                   0.61                1.4   
 6                          78.0                   0.61                1.4   
 7                          78.0                   0.61                1.4   
 8                          78.0                   0.61                1.4   
 9                          78.0                   0.61                1.4   
 10                         78.0                   0.61                1.4   
 11                         78.0                   0.61                1.4   
 12                         78.0                   0.61                1.4   
 13                         78.0                   0.61                1.4   
 14                         78.0                   0.61                1.4   
 15                         78.0                   0.61                1.4   
 16                         78.0                   0.61                1.4   
 17                         78.0                   0.61                1.4   
 18                         78.0                   0.61                1.4   
 19                         78.0                   0.61                1.4   
 20                         78.0                   0.61                1.4   
 21                         78.0                   0.61                1.4   
 22                         78.0                   0.61                1.4   
 23                         78.0                   0.61                1.4   
 24                         78.0                   0.61                1.4   
 25                         78.0                   0.61                1.4   
 26                         78.0                   0.61                1.4   
 27                         78.0                   0.61                1.4   
 28                         78.0                   0.61                1.4   
 29                         78.0                   0.61                1.4   
 30                         78.0                   0.61                1.4   
 31                         78.0                   0.61                1.4   
 32                         78.0                   0.61                1.4   
 33                         78.0                   0.61                1.4   
 34                         78.0                   0.61                1.4   
 35                         78.0                   0.61                1.4   
 36                         78.0                   0.61                1.4   
 37                         78.0                   0.61                1.4   
 38                         78.0                   0.61                1.4   
 39                         78.0                   0.61                1.4   
 40                         78.0                   0.61                1.4   
 41                         78.0                   0.61                1.4   
 42                         78.0                   0.61                1.4   
 43                         78.0                   0.61                1.4   
 44                         78.0                   0.61                1.4   
 45                         78.0                   0.61                1.4   
 46                         78.0                   0.61                1.4   
 47                         78.0                   0.61                1.4   
 48                         78.0                   0.61                1.4   
 49                         78.0                   0.61                1.4   
 50                         78.0                   0.61                1.4   
 51                         78.0                   0.61                1.4   
 52                         78.0                   0.61                1.4   
 53                         78.0                   0.61                1.4   
 54                         78.0                   0.61                1.4   
 55                         78.0                   0.61                1.4   
 
     e_mat_Recycled_HQ  e_mat_Recycled_HQ_fuelfraction  
 0                 1.4                            50.0  
 1                 1.4                            50.0  
 2                 1.4                            50.0  
 3                 1.4                            50.0  
 4                 1.4                            50.0  
 5                 1.4                            50.0  
 6                 1.4                            50.0  
 7                 1.4                            50.0  
 8                 1.4                            50.0  
 9                 1.4                            50.0  
 10                1.4                            50.0  
 11                1.4                            50.0  
 12                1.4                            50.0  
 13                1.4                            50.0  
 14                1.4                            50.0  
 15                1.4                            50.0  
 16                1.4                            50.0  
 17                1.4                            50.0  
 18                1.4                            50.0  
 19                1.4                            50.0  
 20                1.4                            50.0  
 21                1.4                            50.0  
 22                1.4                            50.0  
 23                1.4                            50.0  
 24                1.4                            50.0  
 25                1.4                            50.0  
 26                1.4                            50.0  
 27                1.4                            50.0  
 28                1.4                            50.0  
 29                1.4                            50.0  
 30                1.4                            50.0  
 31                1.4                            50.0  
 32                1.4                            50.0  
 33                1.4                            50.0  
 34                1.4                            50.0  
 35                1.4                            50.0  
 36                1.4                            50.0  
 37                1.4                            50.0  
 38                1.4                            50.0  
 39                1.4                            50.0  
 40                1.4                            50.0  
 41                1.4                            50.0  
 42                1.4                            50.0  
 43                1.4                            50.0  
 44                1.4                            50.0  
 45                1.4                            50.0  
 46                1.4                            50.0  
 47                1.4                            50.0  
 48                1.4                            50.0  
 49                1.4                            50.0  
 50                1.4                            50.0  
 51                1.4                            50.0  
 52                1.4                            50.0  
 53                1.4                            50.0  
 54                1.4                            50.0  
 55                1.4                            50.0  }

5. Run the Mass Flow with Circular Pathways Calculations¶

In [10]:
r1.calculateMassFlow()
>>>> Calculating Material Flows <<<<

Working on Scenario:  standard
********************
Finished Area+Power Generation Calculations
==> Working on Material :  glass
In [11]:
r1.scenario['standard'].dataOut_m.head()
Out[11]:
Area Cumulative_Active_Area EOL_BadStatus EOL_Landfill0 EOL_PATHS EOL_PG Effective_Capacity_[W] Landfill_0_ProjLife MerchantTail_Area MerchantTail_[W] ... Yearly_Sum_Area_PathsBad Yearly_Sum_Area_PathsGood Yearly_Sum_Area_atEOL Yearly_Sum_Power_EOLby_Degradation Yearly_Sum_Power_EOLby_Failure Yearly_Sum_Power_EOLby_ProjectLifetime Yearly_Sum_Power_PathsBad Yearly_Sum_Power_PathsGood Yearly_Sum_Power_atEOL irradiance_stc
0 100000.000000 100000.000000 0.000000 0.000000 0.000000 0.0 1.250000e+07 0.0 0.0 0.0 ... 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.000000 0.0 0.000000 1000.0
1 76123.359583 176123.024755 0.050224 0.284603 0.050224 0.0 2.207388e+07 0.0 0.0 0.0 ... 0.334827 0.0 0.334827 0.0 41.539519 0.0 41.539519 0.0 41.539519 1000.0
2 90232.919255 266348.882165 1.059277 6.002568 1.059277 0.0 3.352945e+07 0.0 0.0 0.0 ... 7.061845 0.0 7.061845 0.0 870.282407 0.0 870.282407 0.0 870.282407 1000.0
3 90206.738132 356514.809212 6.121663 34.689422 6.121663 0.0 4.505398e+07 0.0 0.0 0.0 ... 40.811084 0.0 40.811084 0.0 5002.460079 0.0 5002.460079 0.0 5002.460079 1000.0
4 127527.693882 483905.879546 20.493532 116.130016 20.493532 0.0 6.158409e+07 0.0 0.0 0.0 ... 136.623548 0.0 136.623548 0.0 16649.483925 0.0 16649.483925 0.0 16649.483925 1000.0

5 rows × 45 columns

In [12]:
USyearly, UScum = r1.aggregateResults()
In [13]:
r1.saveSimulation()
:) Saved Input and Output Dataframes

6. Plot Mass Flow Results¶

PV_ICE can also plot the massflow simulation results so you can visualize and interpret the results of your simulation. To see the plotting options, run the plotting method with no inputs:

From this list, select the one that fits your study and select the type of plotting method. There are various plotting options:

  • plotScenariosComparison:
  • plotMaterialComparisonAcrossScenarios:
  • plotMetricResults: You can select the following keyword options: 'VirginStock', 'WasteALL', 'WasteEOL', 'WasteMFG'
  • plotMaterialResults:
  • plotInstalledCapacityResults:
In [14]:
r1.plotMaterialComparisonAcrossScenarios(material='glass', keyword='mat_EOL_Recycled_2_HQ')

You can also view all the keywords you can use by calling the function without argumnets:

In [15]:
r1.plotScenariosComparison()
Please pass a keyword:

 ** Scenario Data In Mass  ['year', 'new_Installed_Capacity_[MW]', 'mod_eff', 'mod_reliability_t50', 'mod_reliability_t90', 'mod_degradation', 'mod_lifetime', 'mod_MFG_eff', 'mod_Repair', 'mod_MerchantTail', 'mod_EOL_collection_eff', 'mod_EOL_pg0_resell', 'mod_EOL_pg1_landfill', 'mod_EOL_pg2_stored', 'mod_EOL_pg3_reMFG', 'mod_EOL_pg4_recycled', 'mod_EOL_reMFG_yield', 'mod_EOL_sp_reMFG_recycle', 'mod_EOL_pb1_landfill', 'mod_EOL_pb2_stored', 'mod_EOL_pb3_reMFG', 'mod_EOL_pb4_recycled']

 ** Scenario Data Out Mass  ['Area', 'Cumulative_Active_Area', 'EOL_BadStatus', 'EOL_Landfill0', 'EOL_PATHS', 'EOL_PG', 'Effective_Capacity_[W]', 'Landfill_0_ProjLife', 'MerchantTail_Area', 'MerchantTail_[W]', 'ModuleTotal_MFG', 'P2_stored', 'P3_reMFG', 'P4_recycled', 'PB1_landfill', 'PB2_stored', 'PB3_reMFG', 'PB3_reMFG_unyield', 'PB3_reMFG_yield', 'PB4_recycled', 'PG1_landfill', 'PG2_stored', 'PG3_reMFG', 'PG3_reMFG_unyield', 'PG3_reMFG_yield', 'PG4_recycled', 'Power_Degraded_[W]', 'Repaired_Area', 'Repaired_[W]', 'Resold_Area', 'Resold_[W]', 'WeibullParams', 'Yearly_Sum_Area_EOLby_Degradation', 'Yearly_Sum_Area_EOLby_Failure', 'Yearly_Sum_Area_EOLby_ProjectLifetime', 'Yearly_Sum_Area_PathsBad', 'Yearly_Sum_Area_PathsGood', 'Yearly_Sum_Area_atEOL', 'Yearly_Sum_Power_EOLby_Degradation', 'Yearly_Sum_Power_EOLby_Failure', 'Yearly_Sum_Power_EOLby_ProjectLifetime', 'Yearly_Sum_Power_PathsBad', 'Yearly_Sum_Power_PathsGood', 'Yearly_Sum_Power_atEOL', 'irradiance_stc']

Or you can print the dataframe keys

In [16]:
list(r1.scenario[list(r1.scenario.keys())[0]].dataIn_m.keys())
Out[16]:
['year',
 'new_Installed_Capacity_[MW]',
 'mod_eff',
 'mod_reliability_t50',
 'mod_reliability_t90',
 'mod_degradation',
 'mod_lifetime',
 'mod_MFG_eff',
 'mod_Repair',
 'mod_MerchantTail',
 'mod_EOL_collection_eff',
 'mod_EOL_pg0_resell',
 'mod_EOL_pg1_landfill',
 'mod_EOL_pg2_stored',
 'mod_EOL_pg3_reMFG',
 'mod_EOL_pg4_recycled',
 'mod_EOL_reMFG_yield',
 'mod_EOL_sp_reMFG_recycle',
 'mod_EOL_pb1_landfill',
 'mod_EOL_pb2_stored',
 'mod_EOL_pb3_reMFG',
 'mod_EOL_pb4_recycled']